package cw.itsource.controller;

import cw.itsource.doc.EmployeeDoc;
import cw.itsource.service.EmployeeServiceImpl;
import cw.itsource.util.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp")
public class EmployeeController {
    @Autowired
    private EmployeeServiceImpl employeeService;

    @GetMapping
    public PageList<EmployeeDoc> searchAll(String keyword) {
        return employeeService.searchHighlightByParam(keyword);
    }


}
